# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:ios)
#蒲公英api_key和user_key
api_key = "7cf553d77990879fd1f03f105130484f"
user_key = "e884b9a9a07a004bc5c817028d8fa6db"
configuration = "Debug"#Debug_Production_Server

platform :ios do
  desc "🚀🚀🚀🚀🚀打包并上传蒲公英🚀🚀🚀🚀"
  lane :pgybeta do
  #指定项目的scheme名称
  scheme = "IOSTestPackageProject"
  #更新描述
  update_desc = "IOSTestPackageProject 更新描述"
  gym(
    #输出的ipa名称
    output_name:"#{scheme}_#{Time.new.strftime("%Y%m%d%H%M")}",
    # 是否清空以前的编译信息 true：是
    clean:true,
    scheme:scheme,
    # 指定打包方式，Release 或者 Debug
    configuration:"#{configuration}",
    # 指定打包所使用的输出方式，目前支持app-store, package, ad-hoc, enterprise, development
    export_method:"development",
    # 指定输出文件夹
    output_directory:"./build/pgy",
    )
  pgyer(api_key: "#{api_key}", user_key: "#{user_key}", update_description: "#{update_desc}")
  end
end
